#include "HelloI.h"
#include <Ice/Ice.h>

using namespace std;
void HelloI::sayHello(::Ice::Int delay, const::Ice::Current &cur)
{
	static int nIndex = 0;
	nIndex += 1;
	if (delay!=0)
	{
		IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(10));
	}
	cout << nIndex<< " -> " << delay <<" Hello World!" << endl;
}

void HelloI::shutdown(const::Ice::Current &cur)
{
	cout << "Shutdown ..." << endl;
	cur.adapter->getCommunicator()->shutdown();
}
